import { useDict } from '@/utils/dict'
import { parseTime } from '@/utils/ruoyi'
export const {
  business_stage,
  business_source,
  rsgl_associated_item,
  project_type,
  winner_order_possibility,
  measurement_unit,
  work_order_type,
  work_order_level,
  system_or_project_name,
  related_products,
  business_customer_type, //客户类型
  industry_category, //客户行业分类
  popularize_type, //推过分类
  lost_business_opportunities, //流失商机
  outlet_type
} = useDict(
  'business_stage',
  'business_source',
  'rsgl_associated_item',
  'project_type',
  'winner_order_possibility',
  'measurement_unit',
  'work_order_type',
  'work_order_level',
  'system_or_project_name',
  'related_products',
  'business_customer_type',
  'industry_category',
  'popularize_type',
  'lost_business_opportunities',
  'outlet_type'
)
// 本地列表配置
export const SALESBUSINESSTABLE = [
  {
    show: true,
    prop: 'customerTaxcode',
    label: '税号',
    align: 'center',
    minWidth: 250
  },
  {
    show: true,
    prop: 'customerName',
    label: '客户名称',
    align: 'center',
    minWidth: 200,
    showOverflowTooltip: true
  },
  {
    show: true,
    prop: 'taxAuthorityName',
    label: '主管税务机关',
    align: 'center',
    minWidth: 200,
    showOverflowTooltip: true
  },
  {
    show: true,
    prop: 'customerGenre',
    label: '客户类型',
    align: 'center',
    minWidth: 200,
    showOverflowTooltip: true
  },
  {
    show: true,
    prop: 'customerIndustry',
    label: '客户行业',
    align: 'center',
    minWidth: 200,
    showOverflowTooltip: true
  },
  {
    show: true,
    prop: 'resource',
    label: '商机来源',
    align: 'center',
    minWidth: 130,
    showOverflowTooltip: true
  },
  {
    show: true,
    prop: 'attnName',
    label: '联系人',
    align: 'center',
    minWidth: 100
  },
  {
    show: true,
    prop: 'job',
    label: '职务',
    align: 'center',
    minWidth: 100
  },
  {
    show: true,
    prop: 'attnPhone',
    label: '联系电话',
    align: 'center',
    minWidth: 100
  },
  {
    show: true,
    prop: 'belongName',
    label: '归属人员',
    align: 'center',
    minWidth: 100
  },
  {
    show: true,
    prop: 'popularizeTypeName',
    label: '推广分类',
    align: 'center',
    minWidth: 200,
    showOverflowTooltip: true
  },
  {
    show: true,
    prop: 'status',
    label: '商机状态',
    align: 'center',
    minWidth: 130
  },
  {
    show: true,
    prop: 'outflowName',
    label: '流失商机',
    align: 'center',
    minWidth: 130,
    showOverflowTooltip: true
  },
  {
    show: true,
    prop: 'projectDemand',
    label: '项目关键需求',
    align: 'center',
    minWidth: 110,
    showOverflowTooltip: true
  },
  {
    show: true,
    prop: 'belongName',
    label: '负责人',
    align: 'center',
    minWidth: 100
  },
  {
    show: true,
    prop: 'projectType',
    label: '项目类型',
    align: 'center',
    minWidth: 100,
    showOverflowTooltip: true
  },
  {
    show: true,
    prop: 'followTime',
    label: '最后跟进',
    align: 'center',
    minWidth: 110,
    formatter: row => {
      return parseTime(row.followTime, '{y}-{m}-{d}')
    }
  },
  {
    show: true,
    prop: 'followNumber',
    label: '跟进次数',
    align: 'center',
    minWidth: 100
  },
  {
    show: true,
    prop: 'companyName',
    label: '所属公司',
    align: 'center',
    minWidth: 110
  },
  {
    show: true,
    prop: 'createTime',
    label: '录入时间',
    align: 'center',
    minWidth: 110
  },
  {
    show: true,
    prop: 'approvalStatus',
    label: '状态',
    align: 'center',
    minWidth: 130
  },
  {
    show: true,
    prop: 'dayNum',
    label: '未跟进天数',
    align: 'center',
    minWidth: 100
  }
]
